package com.css.fxfzypg.logInfo.entity;

import lombok.Data;

import java.io.Serializable;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

@SuppressWarnings("serial")
@Data
public class SLog implements Serializable{
    public static final long serialVersionUID = 24L;
	private String logId;
	private String opId;
	/**
	 * 操作人
	 */
	private String opName;
	/**
	 * 操作人IP
	 */
	private String opIp;
	private String operatorType;
	/**
	 * 操作时间
	 */
	private Date opTime;
	private String sysId;
	/**
	 * 功能名称
	 */
	private String funcId;
	/**
	 * 事件类型
	 */
	private Integer eventType;
	/**
	 * 操作类型
	 */
	private Integer opType;
	/**
	 * 操作对象类型
	 */
	private String opObjType;
	private String opObjId;
	private String relObjType;
	private String relObjId;
	private String serverIp;
	private String serverName;
	/**
	 * 操作结果
	 */
	private String opResult;
	/**
	 * 重要程度
	 */
	private Integer logLevel;
	private String logData;
	private String logMemo;
	private String unitId;
	private String opClientInfo;
	private String opOs;
	private String opExplorer;
	private String opWay;

	private String sysName;
	private String userType;
	private String insertTime;

	// 省份ID
	private String provinceId;
	public SLog() {
	}
    
  public String getOpWay() {
  	return this.opWay;
  }

    public String getProvinceId() {
        return provinceId;
    }

    public void setProvinceId(String provinceId) {
        this.provinceId = provinceId;
    }

    @Override
    public String toString() {
        DateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss,SSS");
        String formatStartTime = sdf.format(opTime);
        return logId +
                "|" + opId +
                "|" + opName +
                "|" + opIp +
                "|" + operatorType +
                "|" + formatStartTime +
                "|" + sysId +
                "|" + funcId +
                "|" + eventType +
                "|" + opType +
                "|" + opObjId +
                "|" + relObjType +
                "|" + relObjId +
                "|" + serverIp +
                "|" + serverName +
                "|" + opResult +
                "|" + logLevel +
                "|" + logData +
                "|" + logMemo +
                "|" + unitId +
                "|" + opOs +
                "|" + opExplorer +
                "|" + opWay +
                "|" + provinceId;
    }
}